const {createProxyMiddleware} = require('http-proxy-middleware')

module.exports = function (app) {
    app.use(
        createProxyMiddleware('/mxnzp-api', {
            target: 'https://www.mxnzp.com/api',
            changeOrigin: true,
            pathRewrite: {'^/mxnzp-api': ''}
        }),
        createProxyMiddleware('/muxiaoguo-api', {
            target: 'https://api.muxiaoguo.cn/api',
            changeOrigin: true,
            pathRewrite: {'^/muxiaoguo-api': ''}
        }),
    )
}
